package io;

import java.io.File;
import java.io.IOException;

public class FileTest {
    public static void main(String[] args) throws IOException {
        File file = new File("D:/2");
       if(file.exists()){
           file.delete();
           file.mkdir();
       }else {
           file.mkdir();
       }
        File file1 = new File("D:/2/2");
        boolean newFile = file1.createNewFile();
        if(newFile){
            System.out.println(newFile);
        }else {
            System.out.println(newFile);
        }
    }
}
